#include "profile.hpp"
//#include "comm.hpp"



int main()
{
    //1写2接受
    Fifo fifo;

    //用只写的方式打开文件
    int fd = open(FIFO_FILE,O_WRONLY);
    if(fd == -1)
    {
        perror("open");
        //exit(OPEN_FIFO_ERR);
    }

    while(true)
    {
        string buf;
        getline(cin,buf);
        
        write(fd,buf.c_str(),buf.size());
    }
    sleep(5);

    close(fd);
    return 0;
}